<!doctype html>
<html lang="zh-CN" th:fragment="layout (title, link, script, content, current)" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title th:replace="${title}"></title>

    <!-- Bootstrap -->
    <link href="/common/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <!--BootstrapTable-->
    <link href="/common/jquery-treegrid/css/jquery.treegrid.css" rel="stylesheet">
    <link rel="stylesheet" href="/common/bootstrap/css/bootstrap-table.min.css">
    <link href="/common/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.css" rel="stylesheet">
    <link href="/common/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.min.css"
          rel="stylesheet">
    <!--自定义-->
    <link href="/custom/css/admin-style.css" rel="stylesheet">
    <link href="/custom/css/style.css" rel="stylesheet">
    <th:block th:replace="${link}"/>

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="/common/bootstrap/js/html5shiv.min.js"></script>
    <script src="/common/bootstrap/js/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="admin-box">
    <header class="global-header">
        <div class="page-container clearfix">
            <h1 class="pull-left left text-primary">迷你考试</h1>
            <div class="pull-right right">
                <div class="dropdown">
                    <a href="javascript:void(0)" class="dropdown-toggle" type="button" id="dropdownMenu1"
                       style="font-weight: bold;"
                       data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                        <span class="text-primary" th:text="${loginUser.showName}"></span>
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
                        <li><a th:href="@{/user/exam/list}">进入前台</a></li>
                        <li><a href="javascript:void(0)" class="updateUserInfo">个人信息</a></li>
                        <li><a class="updatePassword fyl-cp">修改密码</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a th:href="@{/admin/logout}">退出登录</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </header>
    <div class="page-container doc-container">
        <nav class="side-menu">
            <ul class="list-unstyled hidden" id="leftMenu">
                <!--<li><a href="#">首页面板<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span></a></li>-->
                <li>
                    <span class="fyl-cp" data-toggle="collapse" data-target="#collapse1" aria-expanded="true"
                          aria-controls="collapse1">试题管理<span class="glyphicon glyphicon-chevron-down"
                                                              aria-hidden="true"></span></span>
                    <ul id="collapse1" class="collapse list-unstyled">
                        <li><a th:href="@{/admin/question/list}">试题列表</a></li>
                        <li><a th:href="@{/admin/classify/tree/list}">试题分类</a></li>
                        <li><a th:href="@{/admin/label/list}">试题标签</a></li>
                    </ul>
                </li>
                <li><a th:href="@{/admin/user/list}">用户管理<span class="glyphicon glyphicon-chevron-right"
                                                               aria-hidden="true"></span></a></li>
                <li><a th:href="@{/admin/paper/list}">试卷管理<span class="glyphicon glyphicon-chevron-right"
                                                                aria-hidden="true"></span></a></li>
                <li><a th:href="@{/admin/exam/list}">考试管理<span class="glyphicon glyphicon-chevron-right"
                                                               aria-hidden="true"></span></a></li>
                <li><a th:href="@{/admin/material/list}">图片管理<span class="glyphicon glyphicon-chevron-right"
                                                                   aria-hidden="true"></span></a></li>
                <li><a th:href="@{/admin/menu/list3}">菜单管理<span class="glyphicon glyphicon-chevron-right"
                                                               aria-hidden="true"></span></a></li>
                <!--<li>
                    <a data-toggle="collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">待办事项<span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span></a>
                    <ul id="collapse1" class="collapse list-unstyled fyl-pl20 in">
                        <li><a href="#">待办列表</a></li>
                        <li><a href="#">待办列表</a></li>
                    </ul>
                </li>
                <li>
                    <a data-toggle="collapse" href="#collapse2" aria-expanded="false" aria-controls="collapse2">待办事项<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span></a>
                    <ul id="collapse2" class="collapse list-unstyled fyl-pl20">
                        <li><a href="#">待办列表</a></li>
                        <li><a href="#">待办列表</a></li>
                    </ul>
                </li>-->
            </ul>
            <div class="list-group text-center" id="leftLi">
                <a th:each="item:${adminMenuList}" th:object="${item}" th:href="*{link}"
                   th:classappend="${current}==*{mark}?'current'" class="list-group-item" th:text="*{name}"></a>
                <!--<a th:href="@{/admin/user/list}" class="list-group-item" th:classappend="${current}=='user-list'?'current'">用户列表</a>
                <a th:href="@{/admin/question/list}" class="list-group-item" th:classappend="${current}=='question-list'?'current'">试题管理</a>
                <a th:href="@{/admin/label/list}" class="list-group-item" th:classappend="${current}=='label-list'?'current'">标签管理</a>
                <a th:href="@{/admin/paper/list}" class="list-group-item" th:classappend="${current}=='paper-list'?'current'">试卷管理</a>
                <a th:href="@{/admin/exam/list}" th:classappend="${current}=='exam-list'?'current'" class="list-group-item">考试管理</a>
                <a th:href="@{/admin/material/list}" th:classappend="${current}=='material-list'?'current'" class="list-group-item">素材管理</a>-->
                <a th:href="@{/admin/menu/list3}" th:classappend="${current}=='menu-list'?'current'"
                   class="list-group-item">菜单管理</a>
            </div>
        </nav>
        <div class="page-content">
            <th:block th:replace="${content}"></th:block>
        </div>
    </div>
</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="/common/bootstrap/js/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="/common/bootstrap/js/bootstrap.min.js"></script>
<!--BootstrapTable-->
<script src="/common/jquery-treegrid/js/jquery.treegrid.min.js"></script>
<script src="/common/bootstrap/js/bootstrap-table.min.js"></script>
<script src="/common/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js"></script>
<script src="/common/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.min.js"></script>
<script src="/common/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.min.js"></script>
<script src="/common/bootstrap/js/bootstrap-table-zh-CN.min.js"></script>
<!--自定义-->
<script src="/common/layer/layer.js"></script>
<script src="/common/laydate/laydate.js"></script>
<script th:src="@{/common/md5.js}"></script>
<script th:src="@{/common/jquery/lazyload/jquery.lazyload.min.js}"></script>
<script th:src="@{/custom/js/webutils.js}"></script>
<script th:src="@{/custom/js/common.js}"></script>
<script src="/custom/js/admin-common.js"></script>
<!--<script src="/custom/js/admin-left-menu.js"></script>-->
<script th:src="@{/custom/js/upload-file.js}"></script>
<th:block th:replace="${script}"/>
</body>
</html>